package com.etone.smartAudit.dto.iapDataModel;

import com.baomidou.mybatisplus.annotation.TableField;
import com.etone.smartAudit.dto.FileDTO;
import com.etone.smartAudit.dto.iapDataMeta.IapDataMetaDTO;
import com.etone.smartAudit.enums.UpdateFrequency;
import com.etone.smartAudit.enums.UseState;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author: sovy
 * @date: 2020/8/28
 * @description:
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
@ApiModel(value = "元数据表单")
public class IapDataModelDTO implements Serializable {

    @ApiModelProperty("平台系统ID")
    @NotNull
    private Integer platformId;

    @JsonIgnore
    @ApiModelProperty("项目id")
    private Integer itemId;

    @JsonIgnore
    @ApiModelProperty("项目名称")
    private String itemName;

    @ApiModelProperty("宽表名称，中文表名")
    @NotNull
    private String cnTableName;

    @ApiModelProperty("表名（数据字典）,英文表名")
    @NotNull
    private String enTableName;

    @ApiModelProperty("更新频率")
    private UpdateFrequency updateFreq;

    @ApiModelProperty("保存周期")
    private Integer psvCycle;

    @ApiModelProperty("状态")
    private UseState useState;

    @ApiModelProperty("说明")
    private String description;

    @NotNull
    @ApiModelProperty("一级分类id")
    private Integer level1Id;

    @NotNull
    @ApiModelProperty("一级分类")
    private String level1;

    @NotNull
    @ApiModelProperty("二级分类id")
    private Integer level2Id;

    @NotNull
    @ApiModelProperty("二级分类")
    private String level2;


    @ApiModelProperty("数据样例")
    private List<FileDTO> dataExamples;

    @ApiModelProperty("数据字典")
    private List<IapDataMetaDTO> iapDataMetas;

    @JsonIgnore
    @ApiModelProperty("服务器id")
    private Integer serverId;

    @JsonIgnore
    @ApiModelProperty("服务器名称")
    private String serverName;

    @JsonIgnore
    @ApiModelProperty("服务器ip")
    private String serverIp;

    @JsonIgnore
    @ApiModelProperty("数据库库名")
    private String databaseName;

    @JsonIgnore
    @ApiModelProperty("schema")
    private String schemaName;

    @ApiModelProperty(value = "敏感等级id")
    private Integer senLevelId;

    @ApiModelProperty(value = "等级名称")
    private String senLevel;

    @ApiModelProperty(value = "数据平台id")
    private Integer dataPssAId;

    @ApiModelProperty(value = "数据平台名称")
    private String dataPssA;

    @ApiModelProperty(value = "数据维护标签id集合")
    private String dataAssertIds;

    @ApiModelProperty(value = "数据维护标签名称")
    private String dataAssertNames;


    @ApiModelProperty(value = "质量维度标签id集合")
    private String dataMassIds;


    @ApiModelProperty(value = "质量维度标签名称")
    private String dataMassNames;


    @ApiModelProperty(value = "使用方维度标签id集合")
    private String dimensionIds;


    @ApiModelProperty(value = "使用方维度标签名称")
    private String dimensionNames;


    @ApiModelProperty(value = "自动化维度标签id集合")
    private String autoTagIds;


    @ApiModelProperty(value = "自动化维度标签名称")
    private String autoTagNames;


    @ApiModelProperty(value = "数据时效开始时间")
    private Date startDateTime;


    @ApiModelProperty(value = "数据时效结束时间")
    private Date endDateTime;
}
